const mongoose = require('mongoose');
const { getMeta, preSave } = require('../helpers');

/** 定义 InviteCode Schema */
const InviteCodeSchema = new mongoose.Schema({
  code: String,
  user: String,
  meta: getMeta(),
});

InviteCodeSchema.pre('save', preSave);

/** 注册 User shecma */
const UserModel = mongoose.model('InviteCode', InviteCodeSchema);
